package com.example.spring.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.spring.demo.entity.FileRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2024/12/31 0:31
 **/
@Mapper
public interface FileMapper extends BaseMapper<FileRecord> {
    @Select("""
select * from file_record where name = #{fileName};
""")
    FileRecord getFileUrlByName(String fileName);

    @Select("""
select * from file_record where category = #{category};
""")
    List<FileRecord> getFileUrlListByCategory(String category);
}
